Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add mget_id_value_compat() #16425

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Sep 9, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

refactor: add mget_id_value_compat()

mget_id_value_compat([names]) fetch a list of name->id->value from
meta-service with exact 2 mget() operations.

This method can be used to optimize batch get operations. For example to
get a list of (DatabaseNameIdent, DatabaseId, DatabaseMeta).

This method requires the id type to be a Id<xxxId> type.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Refactoring

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Sep 9, 2024
@drmingdrmer drmingdrmer marked this pull request as ready for review September 9, 2024 10:55
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. A-meta Area: databend meta serive labels Sep 9, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 9, 2024
@drmingdrmer drmingdrmer marked this pull request as draft September 9, 2024 11:02
@drmingdrmer drmingdrmer marked this pull request as ready for review September 9, 2024 11:03
`mget_id_value_compat([names])` fetch a list of `name->id->value` from
meta-service with exact 2 mget() operations.

This method can be used to optimize batch get operations. For example to
get a list of `(DatabaseNameIdent, DatabaseId, DatabaseMeta)`.

This method requires the id type to be a `Id<xxxId>` type.

- Part of datafuselabs#16421
@drmingdrmer drmingdrmer merged commit 72db96e into datafuselabs:main Sep 9, 2024
71 checks passed
@drmingdrmer drmingdrmer deleted the 141-mget-id-values branch September 9, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: databend meta serive lgtm This PR has been approved by a maintainer pr-refactor this PR changes the code base without new features or bugfix size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants